import queuedemo.MyQueue;
import stackdemo.MyStack;

import java.util.Deque;
import java.util.LinkedList;
import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2023-12-06
 * Time: 16:34
 */
public class Test {
    public static void main(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);

        System.out.println(myQueue.poll());
        System.out.println(myQueue.poll());

        Deque<Integer> queue2 = new LinkedList<>();

    }













    public static void main2(String[] args) {
        MyStack stack = new MyStack();
        stack.push(12);
        stack.push(23);
        stack.push(34);
        stack.push(45);

        int ret = stack.pop();  //pop相当于删除元素
        System.out.println(ret);

        int ret2 = stack.peek();  //
        System.out.println(ret2);
        System.out.println(stack.isEmpty()); //判断栈是否为空
    }
}
